<?php
class FrmAccess{
	private $validator;
	private $easyForm;
	private $divAccess;
	private $errorMessage;
	
	function __construct(){
		$this->validator=new Validator("frmAccess");
		$this->validator->start();
			$this->validator->noEmpty("nick","El campo Nick NO puede estar vacío!!!");
			$this->validator->noEmpty("password", "Debe tener algún password!!!");
		$this->validator->end();
	
		$this->easyForm=new EasyForm("frmAccess","frmAccess","post","../Events/EventsFrmAccess.php","Datos de acceso:","","","","yes");
		$this->easyForm->addInput(1,"Nick:","nick","nick","","","","","form");
		$this->easyForm->addInputPassword(1,"Password:","password","password","","","","","form");
		$this->easyForm->addButton(1,"Aceptar","aceptar","aceptar","","Aceptar","Aceptar","submit","","button");
		
		$this->errorMessage="";
		
		$this->divAccess=new Div("divAccess","divAccess","container",array(),"","","","","yes");
	}
	function setErrorMessage($message=""){
		$this->errorMessage=$message;
	}
	function getErrorMessage(){
		return $this->errorMessage;
	}
	
	function show(){
		$this->divAccess->start();
			$this->easyForm->show(1,3);
			//echo "<br />";
			echo "<blink>".$this->errorMessage."</blink>";
		$this->divAccess->end();
	}
}
?>